# -*- coding:utf-8 -*-
class Errorhandler:
    def init_app(self, app):
        @app.errorhandler(400)
        def error_handler_400(e):
            return e,400

        @app.errorhandler(401)
        def error_handler_401(e):
            return e,401

        @app.errorhandler(403)
        def error_handler_403(e):
            return e,403

        @app.errorhandler(404)
        def error_handler_404(e):
            return e,404

        @app.errorhandler(500)
        def error_handler_500(e):
            return e,500

        @app.errorhandler(503)
        def error_handler_500(e):
            return e,503


errorhandler = Errorhandler()
